package com.liulimi.fastapi.core.exception.asserts;

import com.liulimi.fastapi.core.exception.AuthSignatureException;
import com.liulimi.fastapi.core.exception.BaseException;
import com.liulimi.fastapi.core.http.response.ResultEnum;

/**
 * @author Wenbo
 * @date 2021/1/12 15:16
 * @Email 969100115@qq.com
 * @phone 17621847037
 */
public class AuthSignatureAssert extends Assert {
   static AuthSignatureAssert authSignatureAssert;

    public static AuthSignatureAssert getInstance(){
        if (authSignatureAssert!=null){
            return authSignatureAssert;
        }else {
            authSignatureAssert = new AuthSignatureAssert();
            return authSignatureAssert;
        }
    }


//    public static void signatureHeadersHasNull(ResultEnum resultEnum,String description){
//        throw new AuthSignatureException(resultEnum,description);
//    }

    @Override
    BaseException throwException(ResultEnum resultEnum,String description) {
        throw new AuthSignatureException(resultEnum,description);
    }

    @Override
    <E> AssertResult exceptionAssert(E e) {
        if(true){
            return new AssertResult(false,  "test");
        }
        return new AssertResult(true,  "test");
    }

}
